// 首页的less文件
// 将刚设置好的common.less引入到首页的index.less中 ，语法如下
// 把一个样式文件导入到另一个样式文件里面
@import "common.less";
a {
    text-decoration: none;
    color: #333;
}
* {
    margin: 0;
    padding: 0;
}
input {
    outline: none;
}
body {
    min-width: 320px;
    width: (750rem/50);
    margin: 0 auto;
    font-family: Arial, Helvetica;
    // 指行高为字体大小的1.5倍
    line-height: 1.5;
    background-color:#f2f2f2;
}
// 页面元素rem计算公式： 页面元素的px值/html字体大小50
// 顶部搜索框
@baseFont: 50px;
.search-content {
    display: flex;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 15rem;
    height: (88rem/@baseFont);
    background-color: #ffdb47;
}
.classify {
    width: (44rem/@baseFont);
    height: (70rem/@baseFont);
    // background-color: pink;
    margin: (11rem/@baseFont) (25rem/@baseFont) (7rem/@baseFont) (24rem/@baseFont);
    img {
        width: 100%;
        height: 100%;
    }
}
.search {
    flex: 1;
    input {
        // box-sizing: border-box;
        border: 0;
        padding-left: (55rem/@baseFont);
        width: 100%;
        height: (66rem/@baseFont);
        border-radius: (33rem/@baseFont);
        margin-top: (12rem/@baseFont);
        font-size: (25rem/@baseFont);
       color: #757575;
       background-color: #fff2cc;
    }
}
.login {
    width: (75rem/@baseFont);
    height: (70rem/@baseFont);
    // background-color: pink;
    font-size: (25rem/@baseFont);
    text-align: center;
    line-height: (70rem/@baseFont);
    color: #fff;
    margin: (10rem /@baseFont);
}
.banner {
    width: (750rem/@baseFont);
    height: (368rem/@baseFont);
    img {
        width: 100%;
        height: 100%;
    }
}
.ad {
    display: flex;
    // justify-content: space-between;
    // width: (750rem/@baseFont);
    a {
        flex: 1;
        img {width: 100%;
        // height: 100%;
        }
    }
}
// 利用浮动制作nav
/* nav {
    a {
        width: (150rem/@baseFont);
        height: (140rem/@baseFont);
        float: left;
        text-align: center;
        img {
            display: block;
            width: (82rem/@baseFont);
            height: (82rem/@baseFont);
            margin: (10rem/@baseFont) auto 0;
        }
        span {
            display: block;
            font-size: (25rem/@baseFont);
            
        }
    }
} */

// 利用flex布局制作nav
nav {
    width: 15rem;
    display: flex;
    flex-wrap: wrap;
    a {
        text-align: center;
        width: (150rem/@baseFont);
        height: (140rem/@baseFont);
        // flex: 1;
    }
    img {
        width: (82rem/@baseFont);
        height: (82rem/@baseFont);
        margin: (10rem/@baseFont) auto 0;
    }
    span {
        display: block;
        font-size: (25rem/@baseFont);
    }
}